function GetACLApply4() {

	var myData = [
			['1', '申请单1', 'ACL申请单','添加规则','查询','新申请','未执行','审批','test1','2012-02-22 12:00:12','2012-02-22 12:00:12','test1'			,'2012-04-23 14:00:12','test2','2012-04-23 14:00:12','test2','2012-04-23 14:00:12','test2','test2','2012-04-23 14:00:12','test2'],
			['2', '申请单2', 'ACL申请单','修改规则','查询','新申请','未执行','审批','test1','2012-02-22 12:00:12','2012-02-22 12:00:12','test1'			,'2012-04-23 14:00:12','test2','2012-04-23 14:00:12','test2','2012-04-23 14:00:12','test2','test2','2012-04-23 14:00:12','test2'],
			['3', '申请单3', 'ACL申请单','删除规则','查询','未通过审批','已执行','审批','test1','2012-02-22 12:00:12','2012-02-22 12:00:12','test1'	,'2012-04-23 14:00:12','test2','2012-04-23 14:00:12','test2','2012-04-23 14:00:12','test2','test2','2012-04-23 14:00:12','test2'],
			['4', '申请单4', 'ACL申请单','添加规则','查询','已发布','未执行','审批','test1','2012-02-22 12:00:12','2012-02-22 12:00:12','test1'			,'2012-04-23 14:00:12','test2','2012-04-23 14:00:12','test2','2012-04-23 14:00:12','test2','test2','2012-04-23 14:00:12','test2'],
			['5', '申请单5', 'ACL申请单','添加规则','查询','已发布','已执行','审批','test1','2012-02-22 12:00:12','2012-02-22 12:00:12','test1'			,'2012-04-23 14:00:12','test2','2012-04-23 14:00:12','test2','2012-04-23 14:00:12','test2','test2','2012-04-23 14:00:12','test2']
	];


	var store = new Ext.data.ArrayStore({
				fields : [{
							name : 'id'
						}, {
							name : 'name'
						}, {
							name : 'desc'
						}, {
							name : 'type'
						}, {
							name : 'browse'
						}, {
							name : 'applystatus'
						}, {
							name : 'runstatus'
						}, {
							name : 'apply'
						}, {
							name : 'applyname'
						}, {
							name : 'applytime'
						}, {
							name : 'createtime'
						}, {
							name : 'creator'
						}, {
							name : 'modifytime'
						}, {
							name : 'modifier'
						}, {
							name : 'apply1time'
						}, {
							name : 'apply1er'
						}, {
							name : 'applyingtime'
						}, {
							name : 'applyinger'
						}, {
							name : 'sendtime'
						}, {
							name : 'sender'
						}]
			});
			



	store.loadData(myData);
	var nowpage = new Ext.Toolbar.TextItem('1');
	var countpage = new Ext.Toolbar.TextItem('共1页');
	var now_page = 0;
	var count_page = 0;
	var sm = new Ext.grid.CheckboxSelectionModel();
	var grid = new Ext.grid.GridPanel({
				store : store,
				columns : [sm, {
							id : 'id',
							header : 'id',
							width : 10,
							sortable : true,
							dataIndex : 'id',
							hidden : true
						}, {
							header : '申请单名称',
							width : 100,
							sortable : true,
							dataIndex : 'name'
						}, {
							header : '申请单类型',
							width : 100,
							sortable : true,
							dataIndex : 'type'
						}, {
							header : '状态',
							width : 70,
							sortable : true,
							dataIndex : 'applystatus'
						}, {
							header : '审批者',
							width : 70,
							sortable : true,
							dataIndex : 'applyname'
						}, {
							header : '审批时间',
							width : 150,
							sortable : true,
							dataIndex : 'applytime'
						}, {
							header : '创建者',
							width : 100,
							sortable : true,
							dataIndex : 'creator'
						}, {
							header : '创建时间',
							width : 150,
							sortable : true,
							dataIndex : 'createtime'
						}, { 
							header : '修改者',
							width : 100,
							sortable : true,
							dataIndex : 'modifier'
						}, {
							header : '修改时间',
							width : 150,
							sortable : true,
							dataIndex : 'modifytime'
						}, { 
							header : '审核人员',
							width : 100,
							sortable : true,
							dataIndex : 'applyinger'
						}, {
							header : '审核时间',
							width : 150,
							sortable : true,
							dataIndex : 'applyingtime'
						}, { 
							header : '下发人员',
							width : 100,
							sortable : true,
							dataIndex : 'sender'
						}, {
							header : '下发时间',
							width : 150,
							sortable : true,
							dataIndex : 'sendtime'
						}],
				sm : sm,
				tbar : [ {
							text : '申请单明细',
							tooltip : '申请单明细',
							iconCls : 'find',
							handler : function() {	
								SetACLApply1();						
							}
						}, '-', {
							text : '确认申请单',
							tooltip : '确认申请单',
							iconCls : 'tick',
							handler : function() {	
								ACLApplying4();					
							}
						}],
				bbar : [{
					tooltip : '首页',
					handler : function() {
						reflashgriad(0);
					},
					iconCls : 'frist'
				}, {

					tooltip : '上一页',
					handler : function() {
						reflashgriad(now_page - 1);
					},
					iconCls : 'perv'
				}, nowpage, {

					tooltip : '下一页',
					handler : function() {
						reflashgriad(now_page + 1);
					},
					iconCls : 'next'
				}, {

					tooltip : '最后一页',
					handler : function() {
						reflashgriad(Math.ceil(count_page / 20) - 1);
					},
					iconCls : 'last'
				}, {
					xtype : "tbfill"
				}, countpage],
				stripeRows : true,
				autoExpandColumn : 'id',
				stateful : true,
				stateId : 'aclapplygrid11'
			});
	grid.getSelectionModel().on('selectionchange', function(sm) {
				grid.removeBtn.setDisabled(sm.getCount() < 1);
			});


function renderTopic(value, p, record){
				return String.format("<a href='javascript:void(null)' onclick='javascript:ACLApplying();'>{0}</a>",value);
    }	
	
function renderTopic1(value, p, record){
				return String.format("<a href='javascript:void(null)' onclick='javascript:SetACLApply1();'>{0}</a>",value);
    }	
	
	return grid;
}	

function ACLApplying4(setReturn){

	var states = [
		['1', '添加规则'],
		['2', '修改规则'],
		['3', '删除规则']
		];
	var states2 = [
		['1', 'ALL'],
		['2', 'TCP'],
		['3', 'UDP']
		];
	var states3 = [
		['1', 'ALL'],
		['2', 'IN'],
		['3', 'OUT']
		];
	var states4 = [
		['1', '禁止'],
		['2', '放行']
		];	
	var states5 = [
		['1', '无'],
		['2', '设备1'],
		['3', '设备2'],
		['4', '设备3']
		];	

	var set_center = {
		xtype: 'fieldset',
		margins:'5 5 5 5',
		layout : 'form',
		region:'center',
		bodyStyle : 'padding:10px;',
		items: [
						{
								xtype : 'textfield',
								fieldLabel : '名称',
								id : 'name',
								name : 'name',
								value:'申请单1',
								anchor : '100%'
						},{
								xtype : 'textarea',
								fieldLabel : '描述',
								id : 'desc',
								name : 'desc',
								value:'ACL申请单',
								anchor : '100%'
						},{
								fieldLabel: '申请单类型',
								xtype : 'combo',
								name : 'time',
								frame : true,
								id : 'time',
								store : new Ext.data.ArrayStore({
										fields : ['abbr', 'state'],
										data : states
									}),
								valueField : 'abbr',
								displayField : 'state',
								typeAhead : true,
								mode : 'local',
								triggerAction : 'all',
								value : '1',
								editable : false,
								anchor: '100%'
						},new Ext.form.CompositeField({ 
							    fieldLabel: '选择应用系统', 
							    items: [ 
							    		
							        new Ext.form.TextField({ 
										    name: 'my_field',
										    value:'',
										    flex: 1 
										  }),{ 
													xtype:"button", 
													text:"...", 
													handler:function() 
													{ 
															GetLinkApplication();
													}
											}
							         
							    ] 
						}),{
								fieldLabel: '选择设备',
								xtype : 'combo',
								name : 'device',
								frame : true,
								id : 'device',
								store : new Ext.data.ArrayStore({
										fields : ['abbr', 'state'],
										data : states5
									}),
								valueField : 'abbr',
								displayField : 'state',
								typeAhead : true,
								mode : 'local',
								triggerAction : 'all',
								value : '1',
								editable : false,
								anchor: '100%'
						},{
								xtype : 'textfield',
								fieldLabel : '源IP',
								id : 'srcip1',
								name : 'srcip1',
								value:'192.168.1.1',
								anchor : '100%'
						},{
								xtype : 'textfield',
								fieldLabel : '掩码',
								id : 'srcmask1',
								name : 'srcmask1',
								value:'255.255.255.0',
								anchor : '100%'
						},new Ext.form.CompositeField({ 
										    fieldLabel: '源端口范围', 
										    items: [ 
										    		
										    		
										        new Ext.form.TextField({ 
													    name: 'my_field', 
													    value:'1',
													    flex: 1 
													  }),{
															xtype: 'label',
															style:'padding-top: 5px; ', 
															text:'~'
														},new Ext.form.TextField({ 
													    name: 'my_field', 
													    value:'65535',
													    flex: 1 
													  })
										         
										    ] 
						}),{
								xtype : 'textfield',
								fieldLabel : '目的IP',
								id : 'destip1',
								name : 'destip1',
								value:'192.168.31.1',
								anchor : '100%'
						},{
								xtype : 'textfield',
								fieldLabel : '掩码',
								id : 'destmask1',
								name : 'destmask1',
								value:'255.255.225.0',
								anchor : '100%'
						},new Ext.form.CompositeField({ 
										    fieldLabel: '目的端口范围', 
										    items: [ 
										    		
										    		
										        new Ext.form.TextField({ 
													    name: 'my_field', 
													    value:'1',
													    flex: 1 
													  }),{
															xtype: 'label',
															style:'padding-top: 5px; ', 
															text:'~'
														},new Ext.form.TextField({ 
													    name: 'my_field', 
													    value:'6552',
													    flex: 1 
													  })
										         
										    ] 
						}),{
								fieldLabel: '协议',
								xtype : 'combo',
								name : 'protocol1',
								frame : true,
								id : 'protocol1',
								store : new Ext.data.ArrayStore({
										fields : ['abbr', 'state'],
										data : states2
									}),
								valueField : 'abbr',
								displayField : 'state',
								typeAhead : true,
								mode : 'local',
								triggerAction : 'all',
								value : '1',
								editable : false,
								anchor: '100%'
						},{
								fieldLabel: '方向',
								xtype : 'combo',
								name : 'path1',
								frame : true,
								id : 'path1',
								store : new Ext.data.ArrayStore({
										fields : ['abbr', 'state'],
										data : states3
									}),
								valueField : 'abbr',
								displayField : 'state',
								typeAhead : true,
								mode : 'local',
								triggerAction : 'all',
								value : '1',
								editable : false,
								anchor: '100%'
						},{
								fieldLabel: '动作',
								xtype : 'combo',
								name : 'action1',
								frame : true,
								id : 'action1',
								store : new Ext.data.ArrayStore({
										fields : ['abbr', 'state'],
										data : states4
									}),
								valueField : 'abbr',
								displayField : 'state',
								typeAhead : true,
								mode : 'local',
								triggerAction : 'all',
								value : '1',
								editable : false,
								anchor: '100%'
						},{
								xtype : 'textarea',
								id : 'applyss',
								name : 'applyss',
								fieldLabel : '确认意见',
								value:'生效',
								anchor : '100%'
						}
	
		]
	};

	var setWindows = new Ext.Window({
				layout : 'border',
				width : 600,
				height : 600,
				title : "确认申请单",
				modal : true,
				resizable : true,
				maximizable : true,
				iconCls : 'firewall',
				items : [set_center],
				plain : true
				
			});
	setWindows.addButton({
				text : "确认",
				handler : function() {
					setWindows.close();
				}
			});
	setWindows.addButton({
				text : '取消',
				handler : function() {
					setWindows.close();
				}
			});
	setWindows.show();
}